package com.example.park_management.controller;


import com.kzx.contribution.service.StartTalkService_kzx;
import com.kzx.contribution.utils.WebSocket;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.io.IOException;

@RestController
public class YuyinController_kzx {
    @Autowired
    private StartTalkService_kzx startTalkServiceKzx;

    @Autowired
    private WebSocket webSocket;
    @RequestMapping("test")
    public void senfMsgToHtml() throws IOException {
            webSocket.sendMessageByUserId("1","hello");
        }

    @RequestMapping("start_talk")
    public void run(){
        startTalkServiceKzx.startTalk();
    }
}


